package com.ruoyi.supervise.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.supervise.domain.BaseProjectInfo;
import com.ruoyi.supervise.domain.MyTest;
import com.ruoyi.supervise.mapper.BaseProjectInfoMapper;
import com.ruoyi.supervise.mapper.MyTestMapper;
import com.ruoyi.supervise.service.IBaseProjectInfoService;
import com.ruoyi.supervise.util.FieldStrUtils;

/**
 * @ClassName: BaseProjectInfoServiceImpl
 * @Description: 项目表impl
 * @Author wtj
 * @DateTime 2020年3月27日 上午9:46:34
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class BaseProjectInfoServiceImpl implements IBaseProjectInfoService 
{
    @Autowired
    private BaseProjectInfoMapper baseProjectInfoMapper;

	@Override
	public BaseProjectInfo selectBaseProjectInfoByGuid(String guid) {
		BaseProjectInfo baseProjectInfo = baseProjectInfoMapper.selectBaseProjectInfoByGuid(guid);
		if(baseProjectInfo!=null) {
			baseProjectInfo.setApprovalNumImage(FieldStrUtils.fileField(baseProjectInfo.getApprovalNumImage()));
			baseProjectInfo.setLicenseNumImage(FieldStrUtils.fileField(baseProjectInfo.getLicenseNumImage()));
			baseProjectInfo.setLandUseNumImage(FieldStrUtils.fileField(baseProjectInfo.getLandUseNumImage()));
		}
		return baseProjectInfo;
	}
}
